<?php
namespace Utils;
use Utils;
require_once __DIR__."/../Model/Talking.php";
class TalkUtils {
    //put your code here
     private static $room_array=Array();
     public static function Create($data) {
        $roomid= rand(0, 999999);
        if(array_key_exists($roomid, (array)self::$room_array))
                    return self::Create();
        $data["roomid"]=$roomid;
        $data["date"]= date("y-m-d h:i:s");
        $temp=new \Model\Talking($data);
        self::$room_array[$roomid]=$temp;
        return $roomid;
    }
    public static function getALL() {
       
        return self::$room_array;
    }
    public static function Remove($roomid) {
        unset(self::$room_array[$roomid]); 
    }
}